/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Server.BUS;

import Server.DAO.LoaiPhong_DAO;
import DTO.LoaiPhong_DTO;
import java.util.ArrayList;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Lenh Ho Xung
 */
public class LoaiPhong_BUS {

    public static ArrayList<LoaiPhong_DTO> layDanhSachMaLoaiPhong() throws Exception {
        return LoaiPhong_DAO.layDanhSachMaLoaiPhong();
    }
    public static ArrayList<LoaiPhong_DTO> layDanhSachTenLoaiPhong() throws Exception{
        return LoaiPhong_DAO.layDanhSachTenLoaiPhong();
    }
    public static String laytenLoaiPhong(String maloaiPhong) throws Exception{
        return LoaiPhong_DAO.layTenLoaiPhong(maloaiPhong);
    }
    public static DefaultTableModel layDanhSachLoaiPhong() throws Exception{
        return LoaiPhong_DAO.layDanhSachLoaiPhong();
    }
    public static void Insert(LoaiPhong_DTO p) throws Exception{
        LoaiPhong_DAO.Insert(p);
    }
    public static void Delete(String maloaiPhong) throws Exception {
        LoaiPhong_DAO.Delete(maloaiPhong);
    }
    public static void Update(LoaiPhong_DTO p) throws Exception{
       LoaiPhong_DAO.Update(p);
    }
    
}
